package extend.part4;


public class Main {
    public static void main(String[] args) {
        Print<Teacher> print = new Print<>();
        Teacher teacher = new Teacher();
        print.print(teacher);
        print.compare(teacher);
        Student student = new Student();
        print.print("adsfas");   //确定了是Teacher类型
        print.compare(123);  //确定了是Teacher类型
    }
}
